<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Fetch the SNMP object which follows the given object id</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.snmp2-get.html">snmp2_get</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.snmp2-real-walk.html">snmp2_real_walk</a></div>
 <div class="up"><a href="ref.snmp.html">SNMP 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.snmp2-getnext" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">snmp2_getnext</h1>
  <p class="verinfo">(PHP &gt;= 5.2.0)</p><p class="refpurpose"><span class="refname">snmp2_getnext</span> &mdash; <span class="dc-title">Fetch the <acronym title="Simple Network Management Protocol">SNMP</acronym> object which follows the given object id</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.snmp2-getnext-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><strong>snmp2_getnext</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$host</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$community</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$object_id</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$timeout</code><span class="initializer"> = 1000000</span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$retries</code><span class="initializer"> = 5</span></span>
  ]] )</div>

  <p class="para rdfs-comment">
   The <span class="function"><strong>snmp2_get_next()</strong></span> function is used to read the
   value of the <acronym title="Simple Network Management Protocol">SNMP</acronym> object that follows the specified
   <em><code class="parameter">object_id</code></em>.
  </p>
 </div>

 
 <div class="refsect1 parameters" id="refsect1-function.snmp2-getnext-parameters">
  <h3 class="title">参数</h3>
  <dl>

   
    <dt>
<em><code class="parameter">host</code></em></dt>

    <dd>

     <p class="para">
      The hostname of the <acronym title="Simple Network Management Protocol">SNMP</acronym> agent (server).
     </p>
    </dd>

   
   
    <dt>
<em><code class="parameter">community</code></em></dt>

    <dd>

     <p class="para">
      The read community.
     </p>
    </dd>

   
   
    <dt>
<em><code class="parameter">object_id</code></em></dt>

    <dd>

     <p class="para">
      The <acronym title="Simple Network Management Protocol">SNMP</acronym> object id which precedes the wanted one.
     </p>
    </dd>

   
   
    <dt>
<em><code class="parameter">timeout</code></em></dt>

    <dd>

     <p class="para">
      The number of microseconds until the first timeout.
     </p>
    </dd>

   
   
    <dt>
<em><code class="parameter">retries</code></em></dt>

    <dd>

     <p class="para">
      The number of times to retry if timeouts occur.
     </p>
    </dd>

   
  </dl>

 </div>

 
 
 <div class="refsect1 returnvalues" id="refsect1-function.snmp2-getnext-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns <acronym title="Simple Network Management Protocol">SNMP</acronym> object value on success or <strong><code>FALSE</code></strong> on error.
   In case of an error, an E_WARNING message is shown.
  </p>
 </div>

 
 <div class="refsect1 examples" id="refsect1-function.snmp2-getnext-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-4462">
    <p><strong>Example #1 Using <span class="function"><strong>snmp2_get_next()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$nameOfSecondInterface&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">snmp2_get_next</span><span style="color: #007700">(</span><span style="color: #DD0000">'localhost'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'public'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'IF-MIB::ifName.1'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>

 
 <div class="refsect1 seealso" id="refsect1-function.snmp2-getnext-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.snmp2-get.html" class="function" rel="rdfs-seeAlso">snmp2_get()</a> - Fetch an SNMP object</span></li>
    <li class="member"><span class="function"><a href="function.snmp2-walk.html" class="function" rel="rdfs-seeAlso">snmp2_walk()</a> - Fetch all the SNMP objects from an agent</span></li>
   </ul>
  </p>
 </div>

 
</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.snmp2-get.html">snmp2_get</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.snmp2-real-walk.html">snmp2_real_walk</a></div>
 <div class="up"><a href="ref.snmp.html">SNMP 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
